package com.ysd.lis.controller.lab;

import com.ysd.common.Result;
import com.ysd.lis.annotation.LogDetail;
import com.ysd.lis.aspect.OperationType;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.lab.LabRptBanFeeitem;
import com.ysd.lis.request.AddFeeItemVsBarCodeParam;
import com.ysd.lis.request.DeleteRptVsBarCodeParam;
import com.ysd.lis.service.lab.LabRptBanFeeitemService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wh
 * @since 2025-02-20
 */
@RestController
@RequestMapping("/lis/rptBan/feeitem")
public class LabRptBanFeeitemController extends BaseController {

    @Autowired
    private LabRptBanFeeitemService labRptBanFeeitemService;

    @ApiOperation("根据报告单元获取禁用收费项目")
    @GetMapping("/findBanFeeListByRptGroup/{rptGroup}")
    public Result findBanFeeListByRptGroup(@PathVariable("rptGroup") String rptGroup) {
        return labRptBanFeeitemService.findBanFeeListByRptGroup(rptGroup);
    }

    @ApiOperation("添加对照关系")
    @PostMapping("/addBanFeeeItem")
    public Result addBanFeeeItem(@RequestBody LabRptBanFeeitem labRptBanFeeitem) {
        return labRptBanFeeitemService.addBanFeeeItem(labRptBanFeeitem);
    }

    @ApiOperation("删除对照关系")
    @PostMapping("/deleteBanFeeItem")
    public Result deleteBanFeeItem(@RequestBody DeleteRptVsBarCodeParam deleteRptVsBarCodeParam) {
        return labRptBanFeeitemService.deleteBanFeeItem(deleteRptVsBarCodeParam);
    }
}
